package main

import (
	"fmt"
)

//无参数有一个返回值
func myFuncq() int {
	return 666
}

//有参数一个返回值
func myFuncw(a, b int) (res int) {
	res = a + b
	return
}

//有参数多个返回值
func my1(a, b int) (re1, re2, res int)  {
	re1 = a + b
	re2 = a - b
	res = a * b
	return
}

func my2(a, b, c int) (rr, tt, yy int) {
	rr, tt, yy = a, b, c
	return
}

func main()  {
	val := myFuncq()
	fmt.Println("val = ", val)
	fmt.Println("===============")
	tar := myFuncw(21, 23)
	fmt.Println("tar = ", tar)
	fmt.Println("===============")
	ll, qq, ww := my1(12, 8)
	fmt.Printf("ll = %d, qq = %d, ww = %d\n", ll, qq, ww)
	fmt.Println("===============")
	gg, uu, hh := my2(23, 45, 66)
	fmt.Printf("gg = %d, uu = %d, hh = %d\n", gg, uu, hh)
}